<!--新增会员-->
<template>
  <section class="webview fixHeight">
    <el-scrollbar style="height:100%">
      <!--      经纪人-->
      <el-form  ref="form" :model="detail" label-width="100px" class="form">
        
       
        <el-form-item label="标题">
          <el-input v-model="detail.title" />
        </el-form-item>
        <el-form-item label="手机号">
          <el-input v-model="detail.phone" />
        </el-form-item>
        <el-form-item label="VR链接">
          <el-input v-model="detail.vrPath" />
        </el-form-item>
		<el-form-item label="图片">
		 <img style="width: 160px;display: block;" v-for="l in showp" :src="l" alt="">
		</el-form-item>
		<el-form-item label="视频">
		 <video style="width: 120px;" :src="detail.videoPath"></video>
		</el-form-item>
		<el-form-item label="设计概要">
				
			</el-form-item>
		<div v-for="(l,index) in detail.worksContent" :key='l.id'>
			<el-form-item label="">
					<el-input v-model="l.title" />
				</el-form-item>
			<el-form-item label="" label-width="80px">
					<el-input v-model="l.content" class="textArea" maxlength='500' type="textarea" :rows="4" placeholder="请输入..." />
				</el-form-item>
		</div>
	<!-- 	<el-form-item label="空间说明">
		  <el-input v-model="detail.vrPath" />
		</el-form-item> -->
     <el-form-item>
<!--          <el-button type="primary" @click="submit">提交</el-button>-->
          <el-button @click="cancel">返回</el-button>
          <el-button @click="ok">通过</el-button>
          <el-button @click="back">打回</el-button>
        </el-form-item>
      </el-form>
      
     
      
    </el-scrollbar>
  </section>
</template>
<script>
  import {zuoupdateStatus,detailUcWorks} from '@/api/api'
  export default {
    data() {
      return {
       showp:[],
        detail: {
			id:0
		}
      }
    },
    created() {
     
		var data=JSON.parse( this.$route.query.data );
        detailUcWorks(data.id).then(data => {
           this.detail = data.data;
		   this.showp = data.data.showPictures.split(',')
        })
           // 
           this.id=data.id
        
        
    },
    methods: {
		ok(){
			var that=this;
			zuoupdateStatus({
			  id: that.id,
			  status: 1
			}).then(data => {
			  Is.tip('设置成功')
			   this.$router.go(-1)
			})
		},
		back(){
			var that=this;
			this.$prompt('请输入打回理由', '提示', {
			          confirmButtonText: '确定',
			          cancelButtonText: '取消'
			        }).then(({ value }) => {
						zuoupdateStatus({
						  id: that.id,
						  status:2,
						  noReason:value
						}).then(data => {
						  Is.tip('设置成功');
						   this.$router.go(-1)
						});
			        }).catch(() => {
			               
			        });
				  		 
			
		},
		cancel(){
			 this.$router.go(-1)
		},
    }}
</script>
